package com.item 
{
	import com.data.GameData;
	import flash.display.MovieClip;
	/**
	 * ...
	 * @author wen
	 */
	public class SnowView 
	{
		private var _con:MovieClip = null;
		
		public const NUMS:int = 80;
		
		private var _list:Array = null;
		
		public function SnowView() 
		{
			
		}
		
		
		public function init(mc:MovieClip):void
		{
			_con = mc;
			_list = new Array();
			
			for (var i:int = 0; i < NUMS; i++ )
			{
				var ss:Snow = new Snow(new snowMc());
				_con.addChild(ss.view);
				
				_list.push(ss);
				
				ss.view.y = GameData.rabbit.y - 700;
				ss.view.x = Math.random() * GameData.gameWidth;
				
				ss.view.scaleX = Math.max(Math.random(), 0.3);
				ss.view.scaleY = ss.view.scaleX;
				
				ss.init();
			}
		}
		
		public function fallCheck():void
		{
			for (var i:int = 0; i < NUMS; i++ )
			{
				var ss:Snow = _list[i];
				
				ss.snowFall();
			}
		}
		
	}

}